package it.yuzuojian.com.util;

import it.yuzuojian.com.annotation.ioc.Autowired;
import it.yuzuojian.com.annotation.ioc.Configuration;

import java.io.File;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedType;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.HashMap;
@Configuration
public class demo {
    private   int c=1;
    public static void main(String[] args) throws NoSuchMethodException, NoSuchFieldException {
        System.out.println(System.getProperty("user.dir"));
        System.out.println(Autowired.class.getName()+"  "+Autowired.class.getSimpleName());
        File file = new File(".");
        System.out.println(file.getAbsolutePath());
        System.out.println(demo.class.getCanonicalName());
        HashMap<String, String> stringStringHashMap = new HashMap<>();
        System.out.println(stringStringHashMap.get("1"));
        Class<demo> demoClass = demo.class;
        Method[] methods = demoClass.getDeclaredMethods();
        for (Method method : methods) {
            System.out.println(method.getName()+"--"+method.getParameterTypes());
        }
        /*Class<?> returnType = a.getReturnType();
        System.out.println(returnType.getName());
        Type genericReturnType = a.getGenericReturnType();
        System.out.println(genericReturnType);
        AnnotatedType annotatedReturnType = a.getAnnotatedReturnType();
        Type type = annotatedReturnType.getType();
        System.out.println(type);
        Field cField = demoClass.getDeclaredField("c");
        System.out.println(cField.getName()+"->"+cField.getModifiers());
        Annotation[] annotations = demoClass.getAnnotations();
        System.out.println(demoClass.isAnnotationPresent(Configuration.class));
        for (Annotation annotation : annotations) {
            System.out.println(annotation.annotationType().getName());
        }*/

    }
    public void a(){

    }
    public int b(){
        return 1;
    }
}
